package com.cll.prototype.gateway.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 描述信息:
 * ip请求策略
 * @author CLL
 * @version 1.0
 * @date 2020/11/9 13:37
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RequestIpStrategy {

    /**
     * 时间窗口
     */
    private Integer second;

    /**
     * 请求频率
     */
    private Integer times;

    public String getCurrentKey(){
        return second + "_" + times;
    }

}